package com.zhehekeji.opsys.api.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @ClassName THomepageLog
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2016-12-12   上午11:09:29
 */
@Entity(name="com.zhehekeji.opsys.api.entity.THomepageLog")
@Table(name="t_homepage_log")
public class THomepageLog extends MongoEntity implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -4827522310789747922L;

	private long id;
	private String stbType;
	private Date visitTime;
	private String account;
	private String homepageCode;
	private String homepageName;
	private String location;
	private Long cpCode;
	private Integer resolution;
	private String areaId;
	private Integer epgPlatformType;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	@Column(name="STB_TYPE",length=255,nullable=true)
	public String getStbType() {
		return stbType;
	}
	public void setStbType(String stbType) {
		this.stbType = stbType;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="VISIT_TIME", nullable=true)
	public Date getVisitTime() {
		return visitTime;
	}
	public void setVisitTime(Date visitTime) {
		this.visitTime = visitTime;
	}
	@Column(name="ACCOUNT",length=255,nullable=true)
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	@Column(name="HOMEPAGE_CODE",length=64,nullable=true)
	public String getHomepageCode() {
		return homepageCode;
	}
	public void setHomepageCode(String homepageCode) {
		this.homepageCode = homepageCode;
	}
	@Column(name="HOMEPAGE_NAME",length=128,nullable=true)
	public String getHomepageName() {
		return homepageName;
	}
	public void setHomepageName(String homepageName) {
		this.homepageName = homepageName;
	}
	@Column(name="LOCATION",length=16,nullable=true)
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return cpCode;
	}
	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
	@Column(name="RESOLUTION",length=2,nullable=true)
	public Integer getResolution() {
		return resolution;
	}
	public void setResolution(Integer resolution) {
		this.resolution = resolution;
	}
	@Column(name="AREA_ID",length=64,nullable=true)
	public String getAreaId() {
		return areaId;
	}
	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}
	@Column(name="EPG_PLATFORM_TYPE",length=2,nullable=true)
	public Integer getEpgPlatformType() {
		return epgPlatformType;
	}
	public void setEpgPlatformType(Integer epgPlatformType) {
		this.epgPlatformType = epgPlatformType;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		THomepageLog other = (THomepageLog) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
}

